<?
    session_start();
    
    // Configuration Class
    class Conf {
        const DBType = "MySQL";             // MySQL is currently the only supported database type
        const VERSION = "0.1";              // Current version
        const LISTING_IMAGES = "listingimages"; // where to store images for the listings
                                                // this folder !MUST! be writable 
        const CHECKBOX_COLS = 4;
        
        public static $PrintedHeader = false;
        static function DoRequires() {
            foreach (scandir("include") as $file) {
                if ($file[0] == '.') continue;
                if (is_file("include/$file")) {
                    require_once("include/$file");
                }
            }
        }
        static function GetApplicationRoot() {
            return str_replace(array("\\",$_SERVER['DOCUMENT_ROOT']),array("/","http://" . $_SERVER['SERVER_NAME'] . "/"),getcwd());
        }
        static function GetFilesystemRoot() {
            return getcwd();
        }
        
        static function GetVersion() { return self::VERSION; }
        static function GetImageDIr() { return self::LISTING_IMAGES; }
    }
    
    ////////////////////////////////////////
    ////////////////////////////////////////
    // Variables you might need to change //
    ////////////////////////////////////////
    ////////////////////////////////////////
    $dbhost = "";
    $dbuser = "";
    $dbpass = "";
    $db     = "";
    
    /// DO NOT edit below this line -- initialization code ///
    Conf::DoRequires();
    MessageManager::Initialize();
    DatabaseManager::Connect($dbhost,$dbuser,$dbpass,$db);
    SettingManager::LoadSettings();
?>
